package com.itheima.Wuziqi;

import com.itheima.Wuziqi.dao.UserDatabase;
import com.itheima.Wuziqi.dao.UserDatabaseInFile;
import com.itheima.Wuziqi.ui.LoginFrame;
import com.itheima.Wuziqi.ui.MainFrame;

import javax.swing.SwingUtilities;

/**
 * 程序入口
 */
public class Main {
    public static void main(String[] args) {
        // 在事件调度线程中启动GUI
        SwingUtilities.invokeLater(() -> {
            UserDatabase userDatabase = new UserDatabaseInFile("users1.dat");
            MainFrame mainFrame = new MainFrame();
            LoginFrame loginFrame = new LoginFrame(userDatabase, mainFrame);
            loginFrame.setVisible(true);
        });
    }
}
    